package hypeerweb;

public class SendContent extends SendVisitor {

	protected static final String CONTENT_KEY = "SendContentKey";
	protected static final String CONTENT_VALUE = "SendContentValue";

    @Override
	protected void targetOperation(Node node, Parameters parameters) {
		node.getContents().set((String)parameters.get(CONTENT_KEY), parameters.get(CONTENT_VALUE));
	}

	public static Parameters createInitialParameters(WebId targetNodeId, String key, Object value)
	{
		Parameters parameters = SendVisitor.createInitialParameters(targetNodeId);

		parameters.set(CONTENT_KEY, key);
		parameters.set(CONTENT_VALUE, value);
		
		return parameters;
	}
}
